<?php

namespace App\Module\Api\Controllers;
use App\Module\Api\Controllers\Request\PaySubmitRequest;
use App\Module\Api\Validator\PaySubmitValidator;
use App\System\Base\Services\PayService;
use App\System\Base\Services\TokenService;
use App\System\Cis\Services\DailyWagePlanningTaskService;
use App\System\Log\Repositories\LogPayRepository;

/**
 *订单提交
 */
class PaySubmitController extends Controller
{

    public function __construct()
    {
        $this->query = new PaySubmitRequest();
        parent::__construct();

    }

    public function index()
    {
        (new PaySubmitValidator())->check();
        $user_id = TokenService::getUserId();
        $log = LogPayRepository::getInstance();
        $res = $log->addData($this->query,$user_id);
        return apiResponse($res);
    }
}
